package cn.chinaflame.pagodas.utils.LightAlgo;

import lombok.Data;

@Data
public class Vertex implements Comparable<Vertex> {
    /**
     * 点灯编号
     */
    private String lightno;

    /**
     * 最短路径长度
     */
    private int path;

    /**
     * 节点是否已经出列(本灯是否已点亮)
     */
    private boolean lighted;

    public Vertex(String lightno) {
        this.lightno = lightno;
        this.path = Integer.MAX_VALUE; //初始设置为无穷大
        this.setLighted(false);
    }

    public Vertex(String lightno, int path) {
        this.lightno = lightno;
        this.path = path;
        this.setLighted(false);
    }

    public String getLightno() {
        return lightno;
    }

    public void setLightno(String lightno) {
        this.lightno = lightno;
    }

    public int getPath() {
        return path;
    }

    public void setPath(int path) {
        this.path = path;
    }

    public boolean isLighted() {
        return lighted;
    }

    public void setLighted(boolean lighted) {
        this.lighted = lighted;
    }

    @Override

    public int compareTo(Vertex o) {
        return o.path > path ? -1 : 1;
    }


}
